package 设计原则.里氏替换;

/**
 * @Author: kirito
 * @Date: 2024/3/7 13:10
 * @Description: 正方形类
 */

public class Square extends Rectangle{

    @Override
    public void setLength(double length) {
        super.setLength(length);
        super.setWidth(length);
    }

    @Override
    public void setWidth(double width) {
        super.setLength(width);
        super.setWidth(width);
    }
}
